package org.simple.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 项目名称：org.spring-leaning
 * 类名称：SpringApplication
 * 类描述：SpringApplication
 * 创建时间：2018/8/6
 *
 * @author guihuo   (E-mail:1620657419@qq.com)
 * @version v1.0
 */
public class SpringApplication {


    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        //基于实例名称查找上下文获得实例
        System.out.println(context.getBean("product"));

        System.out.println(context.getBean("product2"));

    }

}
